package com.ktwlsoft.archivemanage.domain.business.repositoryService;

import com.ktwlsoft.archivemanage.domain.dao.entity.ArchiveUnit;
import com.ktwlsoft.archivemanage.domain.dao.entity.NotifySet;
import com.ktwlsoft.archivemanage.domain.dao.repository.NotifySetMapper;
import com.ktwlsoft.archivemanage.payload.notifySet.ReportUncommitedUnit;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * 设置
 * */
@Service
public class NotifySetRepositoryService {

    private final NotifySetMapper notifySetMapper;

    public NotifySetRepositoryService(NotifySetMapper notifySetMapper) {
        this.notifySetMapper = notifySetMapper;
    }

    public int updateSet(NotifySet notifySet){
        return notifySetMapper.updateByPrimaryKey(notifySet);
    }

    public NotifySet findByName(String name){
        return notifySetMapper.selectByName(name);
    }

    public List<ReportUncommitedUnit> findAllUnitsOfReportUncommited(String dateTime) {
        return notifySetMapper.findAllUnitsOfReportUncommited(dateTime);
    }
}
